<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>GoAI API Quick Start</title>
    <link rel="icon" type="image/svg+xml" href="/web/favicon/favicon.svg">
    <style>
        body { font-family: 'Segoe UI', Arial, sans-serif; background: #f8f9fa; margin: 0; padding: 0; }
        .container { max-width: 700px; margin: 40px auto; background: #fff; border-radius: 10px; box-shadow: 0 2px 8px #0001; padding: 32px; }
        h1 { color: #1a8917; }
        pre { background: #f4f4f4; border-radius: 6px; padding: 12px; overflow-x: auto; }
        .tip { color: #1a8917; font-size: 1.1em; margin-bottom: 18px; font-weight: bold; }
        .section { margin-bottom: 32px; }
        .api { color: #2d7be5; font-weight: bold; }
        a { color: #2d7be5; }
    </style>
</head>
<body>
    <div class="container">
        <div class="tip">GoAI service started successfully!</div>
        <h1>GoAI API Quick Start (Docker)</h1>
        <div class="section">
            <h2>1. Start the Service (Docker Compose)</h2>
            <pre>docker-compose up --build -d</pre>
            <div class="tip" style="font-weight:normal; color:#888;">Make sure <code>config.json</code> is properly configured.</div>
        </div>
        <div class="section">
            <h2>2. Call the API</h2>
            <div class="api">POST /api/v1/generate</div>
            <pre>{
  "prompt": "Translate the following text into Chinese:",
  "text": "Knowlegde can change your fate and English can accomplish your future",
  "model": "gpt-4o"
}</pre>
            <div class="tip" style="font-weight:normal; color:#888;">Example: Use <b>curl</b> to call the API</div>
            <pre>curl -X POST http://localhost:8080/api/v1/generate \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Translate the following text into Chinese:",
    "text": "Knowlegde can change your fate and English can accomplish your future",
    "model": "gpt-4o"
  }'</pre>
            <div class="tip" style="font-weight:normal; color:#888;">Or use <b>PowerShell</b>:</div>
            <pre>Invoke-RestMethod -Uri "http://localhost:8080/api/v1/generate" \
  -Method Post \
  -ContentType "application/json; charset=utf-8" \
  -Body (@{
    "prompt" = "Translate the following text into Chinese:"
    "text" = "Knowlegde can change your fate and English can accomplish your future"
    "model" = "gpt-4o"
  } | ConvertTo-Json -Compress)</pre>
        </div>
        <div class="section">
            <h2>3. Documentation & Help</h2>
            <div>For more usage, see <code>README.md</code> or the <code>docs/</code> folder.</div>
        </div>
        <div class="tip" style="font-weight:normal; color:#888;">GoAI Project: <a href="https://github.com/tabortao/GoAI" target="_blank">https://github.com/tabortao/GoAI</a></div>
    </div>
</body>
</html>